package com.newsee.remote.task;

import com.newsee.remote.ecommerce.service.IShMaterialService;
import com.newsee.remote.ecommerce.service.IShMaterialclassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author liangzhi.chen
 * @description 物料、物资分类基础数据推送接口
 * @date 2019/11/12 下午 02:36
 **/
@Component
public class MaterialTask {

    @Autowired
    private IShMaterialService iShMaterialService;

    @Autowired
    private IShMaterialclassService iShMaterialclassService;

    /**
     * 每天1点30分开始推送 物料基础数据
     */
    @Scheduled(cron = "0 30 1 * * ?")
    public void sync() {
        iShMaterialService.pushMaterial(null, null);
        iShMaterialclassService.pushMaterialClass(null, null);
    }


}
